package com.cskaoyan.gateway.controller.shopping;

import com.mall.commons.result.ResponseData;
import com.mall.commons.result.ResponseUtil;
import com.mall.order.OrderPromoService;
import com.mall.order.dto.CreateSeckillOrderRequest;
import com.mall.order.dto.CreateSeckillOrderResponse;
import com.mall.order.dto.SecKillListRequest;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 秒杀controller
 * created by feng on 7/27/21
 */

@RestController
@RequestMapping("/shopping")
public class seckilllistController {

    @Reference(timeout = 3000, check = false)
    OrderPromoService orderPromoService;

    // 获取秒杀商品列表接口
    @GetMapping("seckilllist")
    public ResponseData seckillist(String sessionId){

        SecKillListRequest secKillListRequest = new SecKillListRequest();
        SecKillListResponse secKillListResponse = orderPromoService.PromoList(secKillListRequest);


        return new ResponseUtil<>().setErrorMsg("秒杀活动不存在" + sessionId);
    }


}